package com.bl.car.repositiy;

import com.bl.car.entity.Owner;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 业户数据接口
 *
 * @author zhx
 * @create 2017-11-16 11:32
 **/
@Repository
public interface OwnerRepository extends JpaRepository<Owner,Long> {

    @Query(value="select a from Owner a where a.userId in ?1")
    List<Owner> findByUserIds(List<String> userIds);

    Owner findByUserId(String userId);

    List<Owner>  findByIsEffect(String isEffect);;
}
